﻿namespace Bootstrap5.Design;

public interface ITextDecorator
{
    ICssUtilityDecorator Text(Text text, BreakPoint? breakPoint = default);
    ICssUtilityDecorator TextDecoration(TextDecoration decoration);
    ICssUtilityDecorator TextColor(TextColor color);
}


public interface IPositionDecorator
{
    ICssUtilityDecorator Position(Position position);
    ICssUtilityDecorator AtPosition(PositionKey position, PositionValue value);
    ICssUtilityDecorator TranslateMiddle(Side? side = default);
}

public interface ISpaceDecorator
{
    /// <summary>
    /// 外边距  margin
    /// </summary>
    /// <param name="num">空间数。</param>
    /// <param name="side">边</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <returns></returns>
    ICssUtilityDecorator Margin(SpaceNum num, SpaceSide? side = default, BreakPoint? breakPoint = default);
    /// <summary>
    /// 内边距  padding
    /// </summary>
    /// <param name="num">空间数。</param>
    /// <param name="side">边</param>
    /// <param name="breakPoint">响应式断点。</param>
    ICssUtilityDecorator Padding(SpaceNum num, SpaceSide? side = default, BreakPoint? breakPoint = default);
    /// <summary>
    /// 栅格之间的间隙。
    /// </summary>
    /// <param name="num">空间数。</param>
    /// <param name="side">边</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <returns></returns>
    ICssUtilityDecorator Gutter(Num num, Side? side,BreakPoint? breakPoint = default);
}

public interface IDisplayFlexDecorator
{
    /// <summary>
    /// Flex 朝向。
    /// </summary>
    /// <param name="orientation">朝向。</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <param name="reserve"><c>true</c> 颠倒排序。</param>
    /// <returns></returns>
    ICssUtilityDecorator FlexOrientation(FlexOrientation orientation,BreakPoint? breakPoint=default, bool reserve = false);
    /// <summary>
    /// 文本的 justify-content 方式。
    /// </summary>
    /// <param name="content">justify-content 方式。</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <returns></returns>
    ICssUtilityDecorator JustifyContent(JustifyContent content, BreakPoint? breakPoint = default);
    /// <summary>
    /// 文本的 align-items 方式。
    /// </summary>
    /// <param name="alignItems">align-items 方式。</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <returns></returns>
    ICssUtilityDecorator AlignItems(AlignItemsOrSelf alignItems, BreakPoint? breakPoint = default);
    /// <summary>
    /// 文本的 align-self 方式。
    /// </summary>
    /// <param name="alignSelf">align-items 方式。</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <returns></returns>
    ICssUtilityDecorator AlignSelf(AlignItemsOrSelf alignSelf, BreakPoint? breakPoint = default);
    /// <summary>
    /// 文本的 align-content 方式。
    /// </summary>
    /// <param name="content">align-content 方式。</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <returns></returns>
    ICssUtilityDecorator AlignContent(AlignContent content, BreakPoint? breakPoint = default);
    /// <summary>
    /// 设置 flex-fill 样式。
    /// </summary>
    /// <param name="breakPoint">响应式断点。</param>
    /// <returns></returns>
    ICssUtilityDecorator FlexFill(BreakPoint? breakPoint = default);
    /// <summary>
    /// 设置 flex-grow 样式。
    /// </summary>
    /// <param name="grow"><c>true</c> 设置 flex-grow-1 否则是 <c>flex-grow-0</c>。</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <returns></returns>
    ICssUtilityDecorator FlexGrow(bool grow=true, BreakPoint? breakPoint = default);
    /// <summary>
    /// 设置 flex-shrink 样式。
    /// </summary>
    /// <param name="grow"><c>true</c> 设置 flex-shrink-1 否则是 <c>flex-shrink-0</c>。</param>
    /// <param name="breakPoint">响应式断点。</param>
    ICssUtilityDecorator FlexShrink(bool shrink = true, BreakPoint? breakPoint = default);
    /// <summary>
    /// Flex 文本换行。
    /// </summary>
    /// <param name="wrap"><c>true</c> 设置 flex-wrap 否则为 <c>flex-nowrap</c>。</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <param name="reserve"><c>true</c> 颠倒顺序。</param>
    /// <returns></returns>
    ICssUtilityDecorator FlexWrap(bool wrap = true, BreakPoint? breakPoint = default, bool reserve = false);
    /// <summary>
    /// Flex 排序。
    /// </summary>
    /// <param name="order">顺序。</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <returns></returns>
    ICssUtilityDecorator FlexOrder(FlexOrder order, BreakPoint? breakPoint = default);
}

public interface ICardDecorator
{
    ICssUtilityDecorator CardText();
    ICssUtilityDecorator CardTitle();
    ICssUtilityDecorator CardSubTitle();
    ICssUtilityDecorator CardLink();
    ICssUtilityDecorator CardImageOverlay();
}

public interface ICssUtilityDecorator:IClassDecoratorProvider, 
    ITextDecorator, 
    IPositionDecorator,
    ISpaceDecorator,
    IDisplayFlexDecorator,
    ICardDecorator
{
    /// <summary>
    /// 元素可见性。
    /// </summary>
    /// <param name="visibility">可见性。</param>
    /// <returns></returns>
    ICssUtilityDecorator Visibility(Visibility visibility);
    /// <summary>
    /// 文本粗细。
    /// </summary>
    /// <param name="fontWeight">粗细程度。</param>
    /// <returns></returns>
    ICssUtilityDecorator FontWeight(FontWeight fontWeight);
    /// <summary>
    /// 文本大小
    /// </summary>
    /// <param name="fontSize">大小。</param>
    /// <returns></returns>
    ICssUtilityDecorator FontSize(FontSize fontSize);
    /// <summary>
    /// 文本风格。
    /// </summary>
    /// <param name="fontStyle">风格类型。</param>
    /// <returns></returns>
    ICssUtilityDecorator FontStyle(FontStyle fontStyle);
    /// <summary>
    /// 文本的垂直对齐方式。
    /// </summary>
    /// <param name="alignment">对齐方式。</param>
    /// <returns></returns>
    ICssUtilityDecorator VerticalAlign(VerticalAlign alignment);
    /// <summary>
    /// 阴影。
    /// </summary>
    /// <param name="shadow">阴影类型。</param>
    /// <returns></returns>
    ICssUtilityDecorator Shadow(Shadow? shadow = default);
    /// <summary>
    /// 行高。
    /// </summary>
    /// <param name="lineHeight">行高类型。</param>
    /// <returns></returns>
    ICssUtilityDecorator LineHeight(LineHeight lineHeight);
    /// <summary>
    /// 宽度。
    /// </summary>
    /// <param name="percent">百分比。</param>
    /// <param name="limitation">限制。</param>
    /// <returns></returns>
    ICssUtilityDecorator Width(LengthPercent percent, LengthLimitation? limitation=default);
    /// <summary>
    /// 高度。
    /// </summary>
    /// <param name="percent">百分比。</param>
    /// <param name="limitation">限制。</param>
    /// <returns></returns>
    ICssUtilityDecorator Height(LengthPercent percent, LengthLimitation? limitation=default);
    /// <summary>
    /// 溢出。
    /// </summary>
    /// <param name="overflow">溢出类型。</param>
    /// <returns></returns>
    ICssUtilityDecorator Overflow(Overflow overflow);
    ICssUtilityDecorator UserSelect(UserSelect select);
    ICssUtilityDecorator PointEvent(PointEvent e);
    /// <summary>
    /// 浮动。
    /// </summary>
    /// <param name="float">浮动方位。</param>
    /// <param name="breakPoint">响应式断点。</param>
    ICssUtilityDecorator Float(Float @float, BreakPoint? breakPoint = default);
    /// <summary>
    /// 显示方式。
    /// </summary>
    /// <param name="display">显示方式。</param>
    /// <param name="breakPoint">响应式断点。</param>
    /// <param name="printOnly">仅打印时显示，若为 <c>true</c> 则 <paramref name="breakPoint"/> 无效。</param>
    /// <returns></returns>
    ICssUtilityDecorator Display(DisplayType display, BreakPoint? breakPoint = default, bool printOnly = default);
    /// <summary>
    /// 背景颜色。
    /// </summary>
    /// <param name="color">颜色。</param>
    /// <param name="gradient"><c>true</c> 背景渐变。</param>
    /// <returns></returns>
    ICssUtilityDecorator BgColor(BgColor color, bool gradient = default);
    /// <summary>
    /// 边框。
    /// </summary>
    /// <param name="placement">朝向。<c>null</c> 表示4周边框。</param>
    /// <param name="subtractive"><c>true</c> 取消边框。</param>
    /// <returns></returns>
    ICssUtilityDecorator Border(Placement? placement = default, bool subtractive = false);
    /// <summary>
    /// 边框颜色。
    /// </summary>
    /// <param name="color">颜色。</param>
    /// <returns></returns>
    ICssUtilityDecorator BorderColor(Color color);
    /// <summary>
    /// 边框宽度。
    /// </summary>
    /// <param name="num">宽度。</param>
    /// <returns></returns>
    ICssUtilityDecorator BorderWidth(Num num);
    /// <summary>
    /// 边框半径。
    /// </summary>
    /// <param name="radius">半径数。</param>
    /// <returns></returns>
    ICssUtilityDecorator BorderRadius(BorderRadius? radius = default);

    /// <summary>
    /// To set class 'visually-hidden' for element.
    /// </summary>
    /// <param name="focusable"></param>
    /// <returns></returns>
    ICssUtilityDecorator VisuallyHidden(bool focusable = default);
    /// <summary>
    /// 超链接文本的颜色。
    /// </summary>
    /// <param name="color">颜色。</param>
    ICssUtilityDecorator LinkColor(Color color);

    /// <summary>
    /// 仅在 <see cref="DisplayType.Grid"/> 下支持。
    /// </summary>
    /// <param name="gap">缝隙数。</param>
    ICssUtilityDecorator Gap(Num gap);
    /// <summary>
    /// 自定义 CssClass。
    /// </summary>
    /// <param name="value">自定义的 css 值。</param>
    /// <returns></returns>
    ICssUtilityDecorator CssClass(string value);
    /// <summary>
    /// 获取 clearfix 样式。
    /// </summary>
    ICssUtilityDecorator ClearFix { get; }
    ICssUtilityDecorator StretchedLink { get; }
    ICssUtilityDecorator FontMonoSpace { get; }

    ICssUtilityDecorator NavBar(NavBarClass navBar);
    ICssUtilityDecorator Head(HeadSize size);
    ICssUtilityDecorator Display(DisplaySize size);
    ICssUtilityDecorator Lead();
    ICssUtilityDecorator Small();
    ICssUtilityDecorator Mark();
    ICssUtilityDecorator Initialism();
    ICssUtilityDecorator Blockquote();
    ICssUtilityDecorator BlockquoteFooter();
    ICssUtilityDecorator ListUnstyled();

    ICssUtilityDecorator Show();
    ICssUtilityDecorator Hide();
}